home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
XmGadget.z
/
XmGadget
Wrap
Text File
|
1998-10-30
|
26KB
|
463 lines
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
NNNNAAAAMMMMEEEE
XXXXmmmmGGGGaaaaddddggggeeeetttt - The Gadget widget class
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <Xm/Xm.h>
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
Gadget is a widget class used as a supporting superclass for
other gadget classes. It handles shadow-border drawing and
highlighting, traversal activation and deactivation, and
various callback lists needed by gadgets.
The color and pixmap resources defined by XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr are
directly used by gadgets. If XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss is used to change
one of the resources for a manager widget, all of the gadget
children within the manager also change.
CCCCllllaaaasssssssseeeessss
Gadget inherits behavior and resources from OOOObbbbjjjjeeeecccctttt and
RRRReeeeccccttttOOOObbbbjjjj.
The class pointer is _x_m_G_a_d_g_e_t_C_l_a_s_s.
The class name is XXXXmmmmGGGGaaaaddddggggeeeetttt.
NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
The following table defines a set of widget resources used
by the programmer to specify data. The programmer can also
set the resource values for the inherited classes to set
attributes for this widget. To reference a resource by name
or by class in a .Xdefaults file, remove the XXXXmmmmNNNN or XXXXmmmmCCCC
prefix and use the remaining letters. To specify one of the
defined values for a resource in a .Xdefaults file, remove
the XXXXmmmm prefix and use the remaining letters (in either
lowercase or uppercase, but include any underscores between
words). The codes in the access column indicate if the
given resource can be set at creation time (C), set by using
XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is
not applicable (N/A).
XXXXmmmmGGGGaaaaddddggggeeeetttt RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
Page 1 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
XmNforeground XmCForeground Pixel dynamic CSG
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNhighlightThickness XmCHighlightThickness Dimension 2 CSG
XmNlayoutDirection XmNCLayoutDirection XmDirection dynamic CG
XmNnavigationType XmCNavigationType XmNavigationType XmNONE CSG
XmNshadowThickness XmCShadowThickness Dimension 2 CSG
XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean True CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData XtPointer NULL CSG
XXXXmmmmNNNNbbbbaaaacccckkkkggggrrrroooouuuunnnndddd
Specifies the background color for the gadget.
XXXXmmmmNNNNbbbbaaaacccckkkkggggrrrroooouuuunnnnddddPPPPiiiixxxxmmmmaaaapppp
Specifies a pixmap for tiling the background. The
first tile is placed at the upper left corner of
the widget's window.
XXXXmmmmNNNNbbbboooottttttttoooommmmSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
Contains the color to use to draw the bottom and
right sides of the border shadow.
XXXXmmmmNNNNbbbboooottttttttoooommmmSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
Specifies the pixmap to use to draw the bottom and
right sides of the border shadow.
XXXXmmmmNNNNffffoooorrrreeeeggggrrrroooouuuunnnndddd
Specifies the foreground drawing color used by
Primitive widgets.
XXXXmmmmNNNNhhhheeeellllppppCCCCaaaallllllllbbbbaaaacccckkkk
Specifies the list of callbacks that is called
when the help key sequence is pressed. The reason
sent by the callback is XXXXmmmmCCCCRRRR____HHHHEEEELLLLPPPP.
XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr
Contains the color of the highlighting rectangle.
XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttOOOOnnnnEEEEnnnntttteeeerrrr
Specifies if the highlighting rectangle is drawn
when the cursor moves into the widget. If the
shell's focus policy is XXXXmmmmEEEEXXXXPPPPLLLLIIIICCCCIIIITTTT, this resource
is ignored, and the widget is highlighted when it
has the focus. If the shell's focus policy is
XXXXmmmmPPPPOOOOIIIINNNNTTTTEEEERRRR and if this resource is True, the
highlighting rectangle is drawn when the the
cursor moves into the widget. If the shell's
focus policy is XXXXmmmmPPPPOOOOIIIINNNNTTTTEEEERRRR and if this resource is
Page 2 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
False, the highlighting rectangle is not drawn
when the the cursor moves into the widget. The
default is False.
XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttPPPPiiiixxxxmmmmaaaapppp
Specifies the pixmap used to draw the highlighting
rectangle.
XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss
Specifies the thickness of the highlighting
rectangle.
XXXXmmmmNNNNllllaaaayyyyoooouuuuttttDDDDiiiirrrreeeeccccttttiiiioooonnnn
Specifies the direction in which components of the
manager (including strings) are laid out. The
values are of type XXXXmmmmDDDDiiiirrrreeeeccccttttiiiioooonnnn. If the widget's
parent is a manager or shell, the value is
inherited from the widget's parent. Otherwise, it
is inherited from the closest ancestor vendor or
menu shell.
XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee
Determines whether the widget is a tab group.
XXXXmmmmNNNNOOOONNNNEEEE Indicates that the widget is not a tab
group.
XXXXmmmmTTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP
Indicates that the widget is a tab
group, unless the XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee of
another widget in the hierarchy is
XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP.
XXXXmmmmSSSSTTTTIIIICCCCKKKKYYYY____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP
Indicates that the widget is a tab
group, even if the XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeeeof
another widget in the hierarchy is
XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP.
XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP
Indicates that the widget is a tab group
and that widgets in the hierarchy whose
XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee is XXXXmmmmTTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP are not
tab groups.
When a parent widget has an
XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee of
XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP, traversal of
non-tab-group widgets within the group
is based on the order of those widgets
in their parent's XXXXmmmmNNNNcccchhhhiiiillllddddrrrreeeennnn list.
Page 3 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
When the XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee of any widget
in a hierarchy is XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP,
traversal of tab groups in the hierarchy
proceeds to widgets in the order in
which their XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeeeresources
were specified as XXXXmmmmEEEEXXXXCCCCLLLLUUUUSSSSIIIIVVVVEEEE____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP
or XXXXmmmmSSSSTTTTIIIICCCCKKKKYYYY____TTTTAAAABBBB____GGGGRRRROOOOUUUUPPPP, whether by
creating the widgets with that value, by
calling XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss, or by calling
XXXXmmmmAAAAddddddddTTTTaaaabbbbGGGGrrrroooouuuupppp.
XXXXmmmmNNNNsssshhhhaaaaddddoooowwwwTTTThhhhiiiicccckkkknnnneeeessssssss
Specifies the size of the drawn border shadow.
XXXXmmmmNNNNttttooooppppSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
Contains the color to use to draw the top and left
sides of the border shadow.
XXXXmmmmNNNNttttooooppppSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
Specifies the pixmap to use to draw the top and
left sides of the border shadow.
XXXXmmmmNNNNttttrrrraaaavvvveeeerrrrssssaaaallllOOOOnnnn
Specifies traversal activation for this gadget.
XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee
Provides the basic support for resolution
independence. It defines the type of units a
widget uses with sizing and positioning resources.
If the widget's parent is a subclass of XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr
and if the XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee resource is not explicitly
set, it defaults to the unit type of the parent
widget. If the widget's parent is not a subclass
of XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr, the resource has a default unit type
of XXXXmmmmPPPPIIIIXXXXEEEELLLLSSSS.
The unit type can also be specified in resource
files, with the following format:
<_f_l_o_a_t_i_n_g _v_a_l_u_e><_u_n_i_t>
where:
_u_n_i_t is <" ", pixels, inches, centimeters,
millimeters, points, font units>
_p_i_x_e_l_s is <_p_i_x, _p_i_x_e_l, _p_i_x_e_l_s>
_i_n_c_h_e_s is <_i_n, _i_n_c_h, _i_n_c_h_e_s>
_c_e_n_t_i_m_e_t_e_r
is <_c_m, _c_e_n_t_i_m_e_t_e_r, _c_e_n_t_i_m_e_t_e_r_s>
Page 4 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
_m_i_l_l_i_m_e_t_e_r_s
is <_m_m, _m_i_l_l_i_m_e_t_e_r, _m_i_l_l_i_m_e_t_e_r_s>
ppppooooiiiinnnnttttssss is <_p_t, _p_o_i_n_t, _p_o_i_n_t_s>
ffffoooonnnntttt uuuunnnniiiittttssss
is <_f_u, ffffoooonnnntttt____uuuunnnniiiitttt, ffffoooonnnntttt____uuuunnnniiiittttssss>
_f_l_o_a_t is {"+"|"-"}{{<"0"-"9">*}.}<"0"-"9">*
Note that the type Dimension must always
be positive.
For example,
xmfonts*XmMainWindow.height: 10.4cm
*PostIn.width: 3inches
XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee can have the following values:
XXXXmmmmPPPPIIIIXXXXEEEELLLLSSSS All values provided to the widget are
treated as normal pixel values.
XXXXmmmmMMMMIIIILLLLLLLLIIIIMMMMEEEETTTTEEEERRRRSSSS
All values provided to the widget are
treated as normal millimeter values.
_X_m_1_0_0_T_H__M_I_L_L_I_M_E_T_E_R_S
All values provided to the widget are
treated as 1/100 of a millimeter.
XXXXmmmmCCCCEEEENNNNTTTTIIIIMMMMEEEETTTTEEEERRRRSSSS
All values provided to the widget are
treated as normal centimeter values.
XXXXmmmmIIIINNNNCCCCHHHHEEEESSSS All values provided to the widget are
treated as normal inch values.
_X_m_1_0_0_0_T_H__I_N_C_H_E_S
All values provided to the widget are
treated as 1/1000 of an inch.
XXXXmmmmPPPPOOOOIIIINNNNTTTTSSSS All values provided to the widget are
treated as normal point values. A point
is a unit used in text processing
applications and is defined as 1/72 of
an inch.
_X_m_1_0_0_T_H__P_O_I_N_T_S
All values provided to the widget are
treated as 1/100 of a point. A point is
a unit used in text processing
Page 5 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
applications and is defined as 1/72
inch.
XXXXmmmmFFFFOOOONNNNTTTT____UUUUNNNNIIIITTTTSSSS
All values provided to the widget are
treated as normal font units. A font
unit has horizontal and vertical
components. These are the values of the
XmScreen resources
XXXXmmmmNNNNhhhhoooorrrriiiizzzzoooonnnnttttaaaallllFFFFoooonnnnttttUUUUnnnniiiittttand
XXXXmmmmNNNNvvvveeeerrrrttttiiiiccccaaaallllFFFFoooonnnnttttUUUUnnnniiiitttt.
_X_m_1_0_0_T_H__F_O_N_T__U_N_I_T_S
All values provided to the widget are
treated as 1/100 of a font unit. A font
unit has horizontal and vertical
components. These are the values of the
XmScreen resources
XXXXmmmmNNNNhhhhoooorrrriiiizzzzoooonnnnttttaaaallllFFFFoooonnnnttttUUUUnnnniiiittttand
XXXXmmmmNNNNvvvveeeerrrrttttiiiiccccaaaallllFFFFoooonnnnttttUUUUnnnniiiitttt.
XXXXmmmmNNNNuuuusssseeeerrrrDDDDaaaattttaaaa
Allows the application to attach any necessary
specific data to the gadget. This is an
internally unused resource.
IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
Gadget inherits resources from the superclass described in
the following table. For a complete description of each
resource, refer to the reference page for that superclass.
RRRReeeeccccttttOOOObbbbjjjj RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNborderWidth XmCBorderWidth Dimension 0 N/A
XmNheight XmCHeight Dimension dynamic CSG
XmNsensitive XmCSensitive Boolean True CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG
OOOObbbbjjjjeeeecccctttt RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
XmNdestroyCallback XmCCallback XtCallbackList NULL C
CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
A pointer to the following structure is passed to each
callback:
typedef struct
{
int _r_e_a_s_o_n;
Page 6 (printed 10/24/98)
XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGaaaaddddggggeeeetttt((((3333XXXX))))
XEvent * _e_v_e_n_t;
} XmAnyCallbackStruct;
_r_e_a_s_o_n Indicates why the callback was invoked. For this
callback, _r_e_a_s_o_n is set to XXXXmmmmCCCCRRRR____HHHHEEEELLLLPPPP.
_e_v_e_n_t Points to the _X_E_v_e_n_t that triggered the callback.
BBBBeeeehhhhaaaavvvviiiioooorrrr
Gadgets cannot have translations associated with them.
Because of this, a Gadget's behavior is determined by the
Manager widget into which the Gadget is placed. If focus is
on a Gadget, events are passed to the Gadget by its Manager.
RRRREEEELLLLAAAATTTTEEEEDDDD
OOOObbbbjjjjeeeecccctttt(3), RRRReeeeccccttttOOOObbbbjjjj(3), XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr(3), and XXXXmmmmSSSSccccrrrreeeeeeeennnn(3).
Page 7 (printed 10/24/98)